package ejbPart.entity.bankAccount;

import exceptions.AccountException;

import javax.ejb.EJBObject;
import java.rmi.RemoteException;

public interface Account extends EJBObject {

    /**
     * Deposit amt to the bank account.
     *
     * @param amt amount of deposited money
     * @throws AccountException
     * @throws RemoteException
     */
    public void deposite(double amt) throws AccountException, RemoteException;

    /**
     * Withdraw amt from bank account
     *
     * @param amt
     * @throws AccountException in case when amt < available balance
     * @throws RemoteException
     */
    public void withdraw(double amt) throws AccountException, RemoteException;


        /* Bunch of getter and setter methods designed to work with information that entity bean represent */

        // Getter methods of the entity bean
    public double getBalance() throws RemoteException;
    public String getOwnerName() throws RemoteException;
    public String getAccountId() throws RemoteException;

        // Setter methods of the entity bean
    public void setOwnerName(String name) throws RemoteException;
    public void setAccountId(String id) throws RemoteException;

}
